home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / graficos / plydat14.arj / MAP1.PI < prev    next >
Encoding:
Text File  |  1992-03-02  |  1.1 KB  |  62 lines

  1. # Sample file demonstrating the mapping of an image onto a box
  2. # Polyray input file: Alexander Enzmann
  3.  
  4. viewpoint {
  5.    from <0,3,-10>
  6.    at <0,0,5>
  7.    up <0,1,0>
  8.    angle 45
  9.    resolution 160, 160
  10.    }
  11.  
  12. # Get various surface finishes
  13. include "colors.inc"
  14.  
  15. # Set up background color & lights
  16. background <0, 0, 0>
  17. light white, <10, 5, -50>
  18.  
  19. # Pull in a Targa file
  20. define ball_image image("m22u.tga")
  21. define box_image_texture
  22. texture {
  23.    special surface {
  24.       color planar_imagemap(ball_image, P, 1)
  25.       ambient 0.2
  26.       diffuse 0.8
  27.       }
  28.    }
  29.  
  30. define ball_image_texture
  31. texture {
  32.    special surface {
  33.       color spherical_imagemap(ball_image, P)
  34.       ambient 0.2
  35.       diffuse 0.8
  36.       }
  37.    }
  38.  
  39. define basic_box
  40. object {
  41.    box <-2, 0, -2>, <2, 1, 2>
  42.    }
  43. basic_box {
  44.    box_image_texture { scale <2, 1, 2> }
  45.    rotate <-30, 30, 0>
  46.    }
  47.  
  48. object {
  49.    sphere <0, 0, 0>, 1
  50.    ball_image_texture
  51.    rotate <30, 45, 0>
  52.    translate <0, 3, 0>
  53.    }
  54.  
  55. # Create a ground plane
  56. object {
  57.    polynomial y + 0.01
  58.    texture { checker matte_white, matte_black }
  59.    scale <10, 10, 10>
  60.    translate <0,-0.01,0>
  61.    }
  62.